<template>
  <div class="container">
    <van-nav-bar title="学员案例" left-arrow @click-left="onClickLeft" fixed placeholder />
    <div class="box" v-for="(item, i) in sd" :key="i">
      <div class="title">{{ sd[i].title }}</div>
      <div class="text">
        <div class="text-left">{{ sd[i].content }}</div>
        <div class="text-right">
          <div class="content-left">
            <div class="content-left-up">体重</div>
            <div class="content-left-down">{{ sd[i].weight }}KG</div>
          </div>
          <span></span>
          <div class="content-right">
            <div class="content-right-up">体脂率</div>
            <div class="content-right-down">{{ sd[i].tizhi }}%</div>
          </div>
        </div>
      </div>
      <div class="image">
        <div class="bimg">
          <div>
            <div></div>
            <div></div>
            <div></div>
            <span>BEFORE</span>
          </div>
          <img :src="sd[i].bimg" />
        </div>
        <div class="aimg">
          <div>
            <div></div>
            <div></div>
            <div></div>
            <span>AFTER</span>
          </div>
          <img :src="sd[i].aimg" />
        </div>
      </div>
      <div class="article">{{ sd[i].article }}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Studentdetails',

  data() {
    return {
      sd: [
        {
          title: '四个月减脂塑形成功',
          content: '减脂3个月',
          weight: '-7.5',
          tizhi: '-12.0',
          article: '学员七月份零基础开始跟我进行力量训练，每周四次课程，生理期休息。搭配干净营养的饮食，体型逐渐达到自己的目标，小姐姐开始健身只想稍微瘦一点，达到目标后，又希望练出更加凹凸有致的形体，如今正在向新的目标迈进！',
          bimg: require('../../assets/student/四个月前.jpg'),
          aimg: require('../../assets/student/四个月后.jpg')
        },
        {
          title: '美貌与才华并存',
          content: '减脂4个月',
          weight: '-1.5',
          tizhi: '-7.6',
          article: '美貌与才华并存的美少女，每周早上勤勤恳恳的过来上课，风雨无阻。数据表明一切',
          bimg: require('../../assets/student/美貌前.jpg'),
          aimg: require('../../assets/student/美貌后.jpg')
        },
        {
          title: '产后妈妈',
          content: '减脂4个月',
          weight: '-5.9',
          tizhi: '-3.7',
          article: '乐观开朗的产后妈妈，刚来的时候有大肚腩，一开始只想瘦一些，让体能力量加强点。',
          bimg: require('../../assets/student/美貌前.jpg'),
          aimg: require('../../assets/student/美貌后.jpg')
        },
        {
          title: '勤劳的小蜜蜂',
          content: '减脂3个月',
          weight: '-7.5',
          tizhi: '-8.0',
          article: '努力刻苦的小姐姐，训练从不找借口，平均每周3次训练，从一开始一练就想吐到现在的这都不是事儿，熬下来了四个月时间，体能 力量都有很大进步，体重下降，体脂下降，每一次数据都在变化。虽然中途因工作忙一个月多月只练了几次，但好在数据没有再往上涨。接下来持续发力',
          bimg: require('../../assets/student/小蜜蜂前.jpg'),
          aimg: require('../../assets/student/小蜜蜂后.jpg')
        }
      ]
    }
  },

  mounted() {},

  methods: {
    onClickLeft() {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="less" scoped>
.container {
  margin: 0 auto;
  padding: 14px;
  .box {
    background-color: #fff;
    // margin: 14px auto;
    padding: 14px;
    .title {
      font-size: 22px;
      color: #333333;
    }
    .text {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 6px 12px;
      color: #534e63;
      background-image: linear-gradient(to right, #dfdbed, #fff);
      margin-top: 16px;
      .text-right {
        display: flex;
        align-items: center;
        span {
          border-left: 1px solid #a5a2af;
          height: 30px;
          margin: 0 14px;
        }
        .content-left,
        .content-right {
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
        }
        .content-left-up,
        .content-right-up {
          font-size: 10px;
        }
        .content-left-down,
        .content-right-down {
          font-size: 18px;
        }
      }
    }
    .image {
      display: flex;
      justify-content: space-between;
      margin-top: 18px;
      .bimg {
        position: relative;
        > div {
          div:nth-child(1) {
            position: absolute;
            top: -3px;
            left: 19px;
            display: block;
            width: 50px;
            height: 14px;
            background-color: #666666;
            transform: skewX(30deg);
            z-index: 1;
          }
          div:nth-child(2) {
            position: absolute;
            top: -3px;
            left: 10px;
            background-color: #333333;
            width: 50px;
            height: 16px;
            transform: skewX(-30deg);
            z-index: 2;
          }
          div:nth-child(3) {
            position: absolute;
            top: -3px;
            left: 0;
            background-color: #333333;
            width: 40px;
            height: 14px;
            padding: 1px 5px;
            z-index: 2;
          }
          span {
            font-size: 10px;
            color: #fff;
            position: absolute;
            top: -1px;
            left: 4px;
            z-index: 2;
          }
        }
      }
      .aimg {
        position: relative;
        > div {
          div:nth-child(1) {
            position: absolute;
            top: -3px;
            left: 19px;
            display: block;
            width: 45px;
            height: 14px;
            background-color: #b9796c;
            transform: skewX(30deg);
            z-index: 1;
          }
          div:nth-child(2) {
            position: absolute;
            top: -3px;
            left: 10px;
            background-color: #ff6040;
            width: 45px;
            height: 16px;
            transform: skewX(-30deg);
            z-index: 2;
          }
          div:nth-child(3) {
            position: absolute;
            top: -3px;
            left: 0;
            background-color: #ff6040;
            width: 35px;
            height: 14px;
            padding: 1px 5px;
            z-index: 2;
          }
          span {
            font-size: 10px;
            color: #fff;
            position: absolute;
            top: -1px;
            left: 6px;
            z-index: 2;
          }
        }
      }
      img {
        width: 155px;
        height: 155px;
        object-fit: cover;
        position: relative;
        z-index: 1;
      }
    }
    .article {
      font-size: 15px;
      color: #666666;
      margin-top: 8px;
      line-height: 1.5em;
    }
  }
}
</style>
